<?php foreach($goods_info as $k=>$v):?>
    <li>
    <a href="<?=Yii::$app->urlManager->createUrl(['goods-detail/index','product_id'=>$v['default_sku']]);?>">
        <div class="img"><img src="<?php echo \Yii::$app->params['goods_image_url'] . str_replace('./upload/', 'upload/',$v['pic']);?>"></div>
        <div class="content">
            <p class="title"><?=$v['goods_name']?></p>
            <!--购买价格-->
            <?php if(isset($v['sale_price_type'])):?>
                <p class="price"><span>价&nbsp;&nbsp;&nbsp;&nbsp;格：</span><em><?=isset($v['sale_price'])?$v['sale_price']:0?><?php echo $v['sale_price_type']?"试豆":"元"?></em></p>
            <?php endif ;?>
            <!--试用价格-->
            <?php if(isset($v['try_price_type'])):?>
                <p class="try-price"><span>试用价：</span><em><?=isset($v['try_price'])?$v['try_price']:0?><?php echo $v['try_price_type']?"试豆":"元"?></em></p>
            <?php endif ?>
            <p class="comment"><?=$v['comment']?>条评论</p>
        </div>
    </a>
</li>
    <?php endforeach;?>


